package com.baosight.risk.common.quartz;

import com.baosight.risk.api.zbaa.IZbaaTargetService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author cuishihao
 * <p>
 * 定时任务
 * <p>
 * 复合型指标计算，每天两点执行一次
 */
@Slf4j
@Component("targetValueCalcTask")
public class TargetValueCalcTask {

    @Autowired
    private IZbaaTargetService targetService;

    public void testParams(String params, String jobId) throws Exception {
        log.info("进入定时任务——复合型指标计算");
        targetService.calculateTargetByTask(params, jobId);
        log.info("定时任务完成——复合型指标计算");
    }

    public void testNoParams() {
        log.error("执行无参方法");
    }
}
